package com.leeon.exception.exmaples;

public class Example1 {

    public static void f() throws Exception{
        System.out.println("throws exception");
        throw new Exception("exception in f()");
    }

    public static void main(String[] args) {
        try {
            f();
        }catch (Exception e){
            e.printStackTrace(System.out);
        }finally {
            System.out.printf("finally");
        }
    }
}
